// base
import Taro, { Component } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
// less
import './index.less'

class ButtonSelf extends Component {
  componentWillMount () {
    // onLoad
  }

  componentDidMount () {
    // onready
  }

  componentWillUnmount () {
    // onUnload
  }

  componentWillReceiveProps (nextprops) {}

  delay (time = 0) {
    return new Promise(resolve => {
      setTimeout(() => {
        resolve()
      }, time)
    })
  }

  render () {
    const { cant } = this.props
    return (
      <View className={`ButtonSelf_id15440 ${cant ? 'opacity_id123' : ''}`}>
        {this.props.text || '确认'}
      </View>
    )
  }
}

export default ButtonSelf
